package com.ruoyi.statisticalCenter.service.impl;

import java.util.List;

import com.github.pagehelper.PageHelper;
import com.ruoyi.statisticalCenter.domain.vo.ScSheetRechargeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.statisticalCenter.mapper.ScSheetRechargeMapper;
import com.ruoyi.statisticalCenter.domain.ScSheetRecharge;
import com.ruoyi.statisticalCenter.service.IScSheetRechargeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 面单充值Service业务层处理
 *
 * @author pyx
 * @date 2024-03-01
 */
@Service
public class ScSheetRechargeServiceImpl implements IScSheetRechargeService
{
    @Autowired
    private ScSheetRechargeMapper scSheetRechargeMapper;

    /**
     * 查询面单充值
     *
     * @param id 面单充值主键
     * @return 面单充值
     */
    @Override
    public ScSheetRecharge selectScSheetRechargeById(Long id)
    {
        return scSheetRechargeMapper.selectScSheetRechargeById(id);
    }

    /**
     * 查询面单充值列表
     *
     * @param scSheetRechargeVo 面单充值
     * @return 面单充值
     */
    @Override
    public List<ScSheetRecharge> selectScSheetRechargeList(ScSheetRechargeVo scSheetRechargeVo)
    {
        //列表添加分页
        PageHelper.startPage(scSheetRechargeVo.getPageDate());
        return scSheetRechargeMapper.selectScSheetRechargeList(scSheetRechargeVo);
    }

    /**
     * 新增面单充值
     *
     * @param scSheetRecharge 面单充值
     * @return 结果
     */
    @Override
    public int insertScSheetRecharge(ScSheetRecharge scSheetRecharge)
    {
        return scSheetRechargeMapper.insertScSheetRecharge(scSheetRecharge);
    }

    /**
     * 修改面单充值
     *
     * @param scSheetRecharge 面单充值
     * @return 结果
     */
    @Override
    public int updateScSheetRecharge(ScSheetRecharge scSheetRecharge)
    {
        return scSheetRechargeMapper.updateScSheetRecharge(scSheetRecharge);
    }

    /**
     * 批量删除面单充值
     *
     * @param ids 需要删除的面单充值主键
     * @return 结果
     */
    @Override
    public int deleteScSheetRechargeByIds(String ids)
    {
        return scSheetRechargeMapper.deleteScSheetRechargeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除面单充值信息
     *
     * @param id 面单充值主键
     * @return 结果
     */
    @Override
    public int deleteScSheetRechargeById(Long id)
    {
        return scSheetRechargeMapper.deleteScSheetRechargeById(id);
    }
}
